<!--
 * 主页（预留）
 * @author: zhaoyahui
 * @since: 2023-09-05
 * HomeView.vue
-->
<template>
  <div class="main-content">
    <a-card class="mainPage" :bordered="false">
      <div class="title">
        欢迎登录 <span>{{ name }}</span>
      </div>
      <img src="@/assets/images/mainPage.png" :alt="'欢迎登录' + name" />
    </a-card>
  </div>
</template>
<script setup>
import { ref } from 'vue'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
let name = ref('')
if (!userStore.configKey || !Object.keys(userStore.configKey).length) {
  userStore.getConfigKey().then((res) => {
    name.value = res.value.name
  })
}
</script>

<style scoped lang="less">
.mainPage {
  height: 100%;
  text-align: center;
  .title {
    font-size: @font-size-title-3;
    font-weight: bold;
    margin-top: @size-24;
    margin-bottom: @size-11;
    span {
      color: rgb(var(--primary-6));
    }
  }
}
</style>
